package com.mall.module.user.controller;

import com.mall.common.model.PageResult;
import com.mall.common.result.Result;
import com.mall.module.user.domain.vo.GrowthRecordVO;
import com.mall.module.user.domain.vo.LevelInfoVO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
public class UserLevelController {
    /**
     * 获取会员等级列表
     */
//    @GetMapping("/level/list")
//    @ApiOperation(value = "获取会员等级列表")
//    public Result<List<LevelInfoVO>> listLevels() {
//        // TODO: 实现获取会员等级列表逻辑
//        return Result.success(List.of());
//    }

    /**
     * 获取成长值记录
     */
    @GetMapping("/growth/record")
    @ApiOperation(value = "获取成长值记录")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "page", value = "页码", defaultValue = "1", dataType = "Integer", paramType = "query"),
        @ApiImplicitParam(name = "size", value = "每页数量", defaultValue = "10", dataType = "Integer", paramType = "query")
    })
    public Result<PageResult<GrowthRecordVO>> getGrowthRecord(
        @RequestParam(defaultValue = "1") Integer page,
        @RequestParam(defaultValue = "10") Integer size) {
        // TODO: 实现获取成长值记录逻辑
        return Result.success(PageResult.empty(page, size));
    }

}